const App = {
    mixins: [Save],//配置文件，路径/utils/mixins.js
    data() {
        return {
            photo,
            childDataForm: [],
            form:{Party_Organization_Name:''},
            type:'0'
        };
    },
    mounted() {
        this.dataForm.Party_Organization_SerialNumber = this.nodeKey;
        let ls_URL = window.location.href;
        this.type = getQueryObject(ls_URL, "type") || '0';// 获取 nodeKey 参数
        this.getData()
    },
    methods: {
        getData() {
            $.ajax({
                headers: requestHeaders(),
                url: `${mh}/generalBusiness/generalQueryByTableName`,
                method: "post",
                data: {
                    Data: 'party_organization',
                    Condition: `Party_Organization_SerialNumber='${this.nodeKey}'`,
                },
                success: (data) => {
                    this.form = data[0];
                },
                complete: (XMLHttpRequest) => {
                    requestPretreatment(XMLHttpRequest);
                },
            });
            $.ajax({
                headers: requestHeaders(),
                url: `${mh}/generalBusiness/generalQueryBySQLSerialNumber`,
                method: "post",
                data: {
                    SQLSerialNumber: "f_party_organization_introduce",
                    Condition: window.btoa(unescape(encodeURIComponent(this.nodeKey))),
                    ExtensionCondition: ''
                },
                success: (data) => {
                    if (data.length > 0) {
                        $.ajax({
                            headers: requestHeaders(),
                            url: `${mh}/generalBusiness/generalQueryByTableName`,
                            method: "post",
                            data: {
                                Data: 'party_organization_introduce_image',
                                Condition: `Party_Organization_Introduce_SerialNumber='${data[0].Party_Organization_Introduce_SerialNumber}'`,
                            },
                            success: (data1) => {
                                this.dataForm = data[0];
                                this.childDataForm = data1;
                            },
                            complete: (XMLHttpRequest) => {
                                requestPretreatment(XMLHttpRequest);
                            },
                        });
                    }
                },complete: (XMLHttpRequest) => {
                    requestPretreatment(XMLHttpRequest);
                },
            });
        }
    },
};
const { createApp, ref } = Vue;
const app = createApp(App);
app.use(ElementPlus, { locale: zhCn });
//这种方式是引入全部图标，无需单个引入
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component);
}
app.component('yl-upload', ylUpload);
app.component('yl-text-editor', ylTextEditor);
const ElMessage = ElementPlus.ElMessage;
app.mount("#app");
